package com.tjnmt.togo.BroadcastReceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.tjnmt.togo.utils.SharedPreferencesUtil;

import cn.jpush.android.api.JPushInterface;

/**
 * 极光推送广播监听器。
 */
public class JPushReceiver extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {
        if(intent.getAction().equals("cn.jpush.android.intent.REGISTRATION")){
            SharedPreferencesUtil.putData("RegistrationID", JPushInterface.getRegistrationID(context));
            Log.e("JPush",JPushInterface.getRegistrationID(context));
        }
        Log.e("TAG",JPushInterface.getRegistrationID(context));
    }

}
